
import threading
import time
import os
from multiprocessing import Queue
q = Queue()
number = 0
def download(q):
    global number
    im = list("ABCDEF")
    for i in im:
        number+=1
        q.put(i)
        if number==3:
            break
        print("正在下载............")
        time.sleep(2)
        print("{}下载成功!!!".format(i))
def lismusic(q):
    music = list("123456")
    for i in music:
        print("正在听{}歌....".format(i))
        time.sleep(1)
        print(q.get())
if __name__ == '__main__':
    num = 3
    t = threading.Thread(target=download,args=(q,))
    t1 = threading.Thread(target=lismusic,args=(q,))
    t.start()
    t1.start()
